package com.googlecode.dgwt.client.dojo.core;

/**
 * Classes that implements this interface is able to generate an native
 * JavaScript from it's current contents for general usage.
 * 
 * @author wellsantos@wellsantos.com
 * @since 0.01
 */
public interface NativeWrapper {

    /**
     * Super classes should create an new mutable JavaScript object with a copy
     * of each public field inside. <br/>
     * <br/>
     * 
     * Example: <br/>
     * <code>
     *     class A { <br/>
     *          int number = 10; <br/>
     *          String objectName = "A class"; <br/>
     *     } <br/>
     * </code> <br/>
     * <br/>
     * Should return an JavaScript object like this: <br/>
     * <code>
     *     { <br/>
     *       "number" : 10, <br/>
     *       "objectName" : "A class" <br/>
     *     } <br/>
     * </code>
     * 
     * @return an JavaScript object
     */
    public JsObject toJavaScript();
    
}
